using System;
using System.Collections;
using System.Web;

namespace Sedna.Core.Controller.Menu
{
	public class ReportGroupsMenuItem : MenuItem, IMenuItem
	{
		private IActionExecutor actionExecutor;
		private IMenuItem templateMenuItem;

		public IActionExecutor ActionExecutor
		{
			set { actionExecutor = value; }
		}

		public IMenuItem TemplateMenuItem
		{
			set { templateMenuItem = value; }
		}

		public override void LoadMenuItems(HttpContext httpContext, IExecutionContext executionContext, string currentScopePrefix)
		{
			executionContext[currentScopePrefix + ".templateMenuItem"] = templateMenuItem;
            actionExecutor.ExecuteAction(executionContext, this, currentScopePrefix, "onMenuLoad");
			MenuItems = (IList)executionContext[currentScopePrefix + ".menuItems"];
		}


	}
}
